const app = getApp();
Component({
  data: {
   showDialog: false,
   items: [],
   chosetext:'',
   model:false
  },
  properties: {
    array:{
      type:Object, //指定传过来的值的类型
      value:{}, //默认值，假如没有值传过来，value就会显示默认值
    },
  },
  methods: {

  
  /*点击变色*/
  onLoad: function (options) {
   var that = this
   that.setData({
    value:'show',
   })
  },
  toggleDialog() {
    this.triggerEvent('showmodel',!this.data.showDialog);
    console.log(this.properties.array,222222);
   this.setData({
    showDialog: !this.data.showDialog
   });
  },
  choseitem(e) {
    this.triggerEvent('updataSelect',e.target.id);
    this.setData({
      chosetext:e.target.id,
      showDialog: !this.data.showDialog,
      model:true
     })
  },
  freetoBack: function () {
    this.triggerEvent('showmodel',false);
   this.setData({
    showDialog: !this.data.showDialog,
   })
  },
}
 })
